package com.winshare.saleAssistant.mapper;

import com.winshare.saleAssistant.domain.dto.req.BaseIdDTO;
import com.winshare.saleAssistant.domain.dto.req.SupplierCreateDTO;
import com.winshare.saleAssistant.domain.dto.req.SupplierQueryDTO;
import com.winshare.saleAssistant.domain.dto.req.SupplierUpdateDTO;
import com.winshare.saleAssistant.domain.dto.resp.SupplierRespDTO;
import com.winshare.saleAssistant.domain.entity.SupplierDO;
import com.winshare.saleAssistant.domain.query.SupplierQuery;
import org.mapstruct.Mapper;
import org.mapstruct.ReportingPolicy;
import org.mapstruct.factory.Mappers;

import java.util.List;

@Mapper(unmappedTargetPolicy = ReportingPolicy.IGNORE)
public interface SupplierMapStruct {

    SupplierMapStruct INSTANCE = Mappers.getMapper(SupplierMapStruct.class);

    SupplierDO fromSupplierCreateDTO(SupplierCreateDTO supplierCreateDTO);

    SupplierDO fromSupplierUpdateDTO(SupplierUpdateDTO supplierUpdateDTO);

    SupplierDO fromBaseIdDTO(BaseIdDTO baseIdDTO);

    SupplierRespDTO fromSupplierDO(SupplierDO supplierDOInSql);

    SupplierQuery fromSupplierQueryDTO(SupplierQueryDTO supplierQueryDTO);

    List<SupplierRespDTO> fromSupplierDOList(List<SupplierDO> supplierDOList);
}
